commonlibsse_ng\re\p\PlayerCharacter/
player_target_loc.rs

1use crate::re::BSCoreTypes::RefHandle;
2use crate::re::NiPoint3::NiPoint3;
3use crate::re::TESObjectCELL::TESObjectCELL;
4use crate::re::TESWorldSpace::TESWorldSpace;
5
6#[repr(C)]
7#[derive(Debug)]
8pub struct PLAYER_TARGET_LOC {
9    world: *mut TESWorldSpace,       // 00
10    interior: *mut TESObjectCELL,    // 08
11    location: NiPoint3,              // 10
12    angle: NiPoint3,                 // 1C
13    arrivalFunc: extern "C" fn(i64), // 28
14    arrivalFuncData: i64,            // 30
15    furnitureRef: RefHandle,         // 38
16    fastTravelMarker: RefHandle,     // 3C
17    resetWeather: bool,              // 40
18    allowAutoSave: bool,             // 41
19    isValid: bool,                   // 42
20    pad43: u8,                       // 43
21    pad44: u32,                      // 44
22}
23const _: () = {
24    assert!(core::mem::offset_of!(PLAYER_TARGET_LOC, world) == 0x00);
25    assert!(core::mem::offset_of!(PLAYER_TARGET_LOC, interior) == 0x08);
26    assert!(core::mem::offset_of!(PLAYER_TARGET_LOC, location) == 0x10);
27    assert!(core::mem::offset_of!(PLAYER_TARGET_LOC, angle) == 0x1c);
28    assert!(core::mem::offset_of!(PLAYER_TARGET_LOC, arrivalFunc) == 0x28);
29    assert!(core::mem::offset_of!(PLAYER_TARGET_LOC, arrivalFuncData) == 0x30);
30    assert!(core::mem::offset_of!(PLAYER_TARGET_LOC, furnitureRef) == 0x38);
31    assert!(core::mem::offset_of!(PLAYER_TARGET_LOC, fastTravelMarker) == 0x3C);
32    assert!(core::mem::offset_of!(PLAYER_TARGET_LOC, resetWeather) == 0x40);
33    assert!(core::mem::offset_of!(PLAYER_TARGET_LOC, allowAutoSave) == 0x41);
34    assert!(core::mem::offset_of!(PLAYER_TARGET_LOC, isValid) == 0x42);
35    assert!(core::mem::offset_of!(PLAYER_TARGET_LOC, pad43) == 0x43);
36    assert!(core::mem::offset_of!(PLAYER_TARGET_LOC, pad44) == 0x44);
37
38    assert!(core::mem::size_of::<PLAYER_TARGET_LOC>() == 0x48);
39};
40
41#[repr(C)]
42#[derive(Debug)]
43pub struct VR_PLAYER_TARGET_LOC {
44    world: *mut TESWorldSpace,    // 0x00
45    interior: *mut TESObjectCELL, // 0x08
46    location: NiPoint3,           // 0x10
47    angle: NiPoint3,              // 0x1C
48    arrivalFunc: fn(i64),         // 0x28
49    arrivalFuncData: i64,         // 0x30
50    furnitureRef: RefHandle,      // 0x38
51    fastTravelMarker: RefHandle,  // 0x3C
52    unk_40: f32,                  // 0x40 - New in VR, always 0.0 in vanilla
53    unk44: u8,                    // 0x44
54    resetWeather: bool,           // 0x45
55    allowAutoSave: u8,            // 0x46
56    isValid: bool,                // 0x47
57    unk48: u8,                    // 0x48
58    unk49: u8,                    // 0x49
59    unk4A: u8,                    // 0x4A
60    unk4B: u8,                    // 0x4B
61    unk4C: u32,                   // 0x4C
62}
63const _: () = assert!(core::mem::size_of::<VR_PLAYER_TARGET_LOC>() == 0x50);